﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ShredTheLog.Api.DataContracts;
using System.Diagnostics.Contracts;

namespace ShredTheLog.Api
{
    [ContractClass(typeof(UiLanguage_Contract))]
    public interface IUiLanguage
    {
        Language Language { get; }
        string Name { get; }
        Language[] SubstituteLanguages { get; }
    }

    [ContractClassFor(typeof(IUiLanguage))]
    internal abstract class UiLanguage_Contract : IUiLanguage
    {
        Language IUiLanguage.Language
        {
            get { throw new NotImplementedException(); }
        }

        string IUiLanguage.Name
        {
            get 
            {
                Contract.Ensures(!String.IsNullOrWhiteSpace(Contract.Result<string>()));
                throw new NotImplementedException(); 
            }
        }

        Language[] IUiLanguage.SubstituteLanguages
        {
            get 
            {
                Contract.Ensures(Contract.Result<Language[]>() != null);
                throw new NotImplementedException(); 
            }
        }
    }

    [ContractClass(typeof(UiLanguageStrings_Contract))]
    public interface IUiLanguageStrings
    {
        Language Language { get; }
        Dictionary<string, string> GetStrings();
    }

    [ContractClassFor(typeof(IUiLanguageStrings))]
    internal abstract class UiLanguageStrings_Contract : IUiLanguageStrings
    {
        Language IUiLanguageStrings.Language
        {
            get { throw new NotImplementedException(); }
        }

        Dictionary<string, string> IUiLanguageStrings.GetStrings()
        {
            Contract.Ensures(Contract.Result<Dictionary<string, string>>() != null);
            throw new NotImplementedException();
        }
    }
}
